]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
status/backlight: Notify slider value changes
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 2 Aug 2023 16:09:46 +0000 (18:09 +0200)
committerMarge Bot <marge-bot@gnome.org>
Sat, 5 Aug 2023 00:46:29 +0000 (00:46 +0000)
The custom setter used by the slider item isn't emitting change
notifications, so the property binding that uses it as source
never propagates the new value.

Fix this by emitting proper change notifications.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2856>

js/ui/status/backlight.js

index cb2904ecee9e4452f049953d229115de0358c34a..e7cf7e795323db115ec47672108009ed0c15779e 100644 (file)
@@ -44,9 +44,14 @@ const SliderItem = GObject.registerClass({
     }
 
     set value(value) {
+        if (this.value === value)
+            return;
+
         this._slider.block_signal_handler(this._sliderChangedId);
         this._slider.value = value / 100;
         this._slider.unblock_signal_handler(this._sliderChangedId);
+
+        this.notify('value');
     }
 });